function price=singlecall(r,time,K,X)

Npath=100000;
discount=exp(-r*time)';
Y=X(floor(time/0.01+0.0005+1),:);
Nterm=size(X*2); 


asset=Y(1)+...
    Y(2)*rand(Npath,1)+...
    Y(3)*rand(Npath,1)+Y(4)*rand(Npath,1)+Y(5)*rand(Npath,1)+...
    Y(6)*rand(Npath,1)+Y(7)*rand(Npath,1)+Y(8)*rand(Npath,1)+...
    Y(9)*rand(Npath,1)+Y(10)*rand(Npath,1)+Y(11)*rand(Npath,1)+...
    Y(12)*rand(Npath,1)+Y(13)*rand(Npath,1)+Y(14)*rand(Npath,1)+...
    Y(15)*rand(Npath,1)+Y(16)*rand(Npath,1);




%asset=exp(asset);
%price=discount*     sum(asset(asset-K>0))         /Npath;
price=sum(asset)/Npath;